package me.sealer.ssm.service.impl;

import me.sealer.ssm.mapper.RolePermissionMapper;
import me.sealer.ssm.model.RolePermission;
import me.sealer.ssm.service.RolePermissionService;
import org.springframework.stereotype.Service;

/**
 * 功能描述： $ RolePermissionServiceImpl
 *
 * @author sealer
 * @email 1178884049@qq.com
 * @date 2019年11月28日 13时10分03秒
 */
@Service
public class RolePermissionServiceImpl implements RolePermissionService {
    private final RolePermissionMapper rolePermissionMapper;

    public RolePermissionServiceImpl(RolePermissionMapper rolePermissionMapper) {
        this.rolePermissionMapper = rolePermissionMapper;
    }

    @Override
    public boolean insert(RolePermission rolePermission) {
        rolePermissionMapper.insert(rolePermission);
        return true;
    }

    @Override
    public void deleteByRoleId(Integer id) {
        rolePermissionMapper.deleteByRoleId(id);
    }
}
